<script lang="ts" setup>
defineOptions({
   name: 'articleDetail'
})

import { ref } from 'vue'
import { getArticleById } from '../../api/article'
import router from '../../router'

const id = router.currentRoute.value.params.id

const text = ref('')
const getOne = () => {
   getArticleById(id as string).then((res) => {
      text.value = res.data.content
   })
   console.log('id', id)
}

getOne()
</script>

<template>
   <div>
      <v-md-editor v-model="text" height="400px"></v-md-editor>
   </div>
</template>
